import React, { Component } from "react";
import List from "./components/List";
import Search from "./components/Search";
export default class App extends Component {
  state = {
    isFirst: true,
    isLoading: false,
    err: "",
    items: [],
  };
  updateAppStates = (obj) => {
    this.setState(obj);
  };

  render() {
    return (
      <div className="container">
        <Search updateItems={this.updateAppStates} {...this.state} />
        <List {...this.state} updateAppStates={this.updateAppStates} />
      </div>
    );
  }
}
